﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="DishSearchForm.aspx.cs" Inherits="App_Commons_DishSearchForm" Title="详细菜单" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" type="text/javascript">
function selectAll()
    {
        for(i=0; i<aspnetForm.elements.length; i++)
        {
            
            var e = aspnetForm.elements[i];
            if (e.type == "checkbox" && !e.checked)
            {
                e.checked=true;
                
            }
        }
    }
     function cancelAll()
    {
        for(i=0; i<aspnetForm.elements.length; i++)
        {
            
            var e = aspnetForm.elements[i];
            if (e.type == "checkbox" && e.checked)
            {
                e.checked=false;
                
            }
        }
    }
</script>
    <div id="tableResult">
        <table width="100%">
            <tr>
                <td>
                    <table class="table_border_line">
                        <tr>
                            <td align="left" colspan="4">

                                <script language="javascript">
                                        (new TitleBar('SearchBar', '检索条件')).showBar();
                                </script>

                            </td>
                        </tr>
                    </table>
                    <table class="table_border_line">
                        <tr>
                            <td style="width: 16px; height: 26px;">
                                &nbsp;</td>
                            <td style="width: 120px; white-space: nowrap; height: 26px;" align="left">
                                用餐类型</td>
                            <td align="left" style="height: 26px; width: 219px;">
                                &nbsp;<asp:DropDownList ID="lstDishTime" runat="server" DataTextField="Content" DataValueField="DictNo">
                                </asp:DropDownList></td>
                            <td align="right" style="height: 26px; width: 3px;">
                                &nbsp;</td>
                            <td style="width: 16px; height: 26px;">
                                &nbsp;</td>
                            <td style="width: 81px; white-space: nowrap; height: 26px;" align="left">
                                &nbsp; 荤素类别</td>
                            <td align="left" style="height: 26px; width: 219px;">
                                <asp:DropDownList ID="lstDishClass" runat="server" DataTextField="Content" DataValueField="DictNo">
                                </asp:DropDownList></td>
                            <td align="right" style="height: 26px">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 16px; height: 26px;">
                                &nbsp;</td>
                            <td style="width: 120px; white-space: nowrap; height: 26px;" align="left">
                                套菜类别</td>
                            <td align="left" style="height: 26px; width: 219px;">
                                &nbsp;<asp:DropDownList ID="lstDishKind" runat="server" DataTextField="Content" DataValueField="DictNo">
                                </asp:DropDownList></td>
                            <td align="right" style="height: 26px; width: 3px;">
                                &nbsp;</td>
                            <td style="width: 16px; height: 26px;">
                                &nbsp;</td>
                            <td style="width: 81px; white-space: nowrap; height: 26px;" align="left">
                                &nbsp; 菜式类别</td>
                            <td align="left" style="height: 26px; width: 219px;">
                                <asp:DropDownList ID="lstDishType" runat="server" DataTextField="Content" DataValueField="DictNo">
                                </asp:DropDownList></td>
                            <td align="right" style="height: 26px">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 16px; height: 26px;">
                                &nbsp;</td>
                            <td style="width: 120px; white-space: nowrap; height: 26px;" align="left">
                                送菜类别</td>
                            <td align="left" style="height: 26px; width: 219px;">
                                &nbsp;<asp:DropDownList ID="lstDishDelivery" runat="server" DataTextField="Content"
                                    DataValueField="DictNo">
                                </asp:DropDownList></td>
                            <td align="right" style="height: 26px; width: 3px;">
                                &nbsp;</td>
                            <td style="width: 16px; height: 26px;">
                                &nbsp;</td>
                            <td style="width: 81px; white-space: nowrap; height: 26px;" align="left">
                                &nbsp; 菜名关键字</td>
                            <td align="left" style="height: 26px; width: 219px;">
                                <asp:TextBox ID="txtDishName" runat="server"></asp:TextBox></td>
                            <td align="right" style="height: 26px">
                                &nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <br />
                    <table>
                        <tr>
                            <td style="width: 80px; height: 24px;">
                                <asp:Button ID="btnSeach" runat="server" CssClass="button" Text="检 索" Width="100%"
                                    OnClick="btnSeach_Click" /></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td align="left">

                    <script language="javascript">
                                        (new TitleBar('SearchBar', '职位信息列表')).showBar();
                    </script>

                </td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="viewSrhRst" runat="server" AutoGenerateColumns="False"
                        CssClass="GridView_table" DataKeyNames="DishId" OnPageIndexChanging="viewSrhRst_PageIndexChanging"
                        OnRowEditing="viewSrhRst_OnRowEditing" OnRowDeleting="viewSrhRst_OnRowDeleting"
                        OnRowDataBound="viewSrhRst_RowDataBound" BorderStyle="Solid" BorderWidth="3px">
                        <Columns>
                            <asp:BoundField HeaderText="菜肴编号" DataField="DishId">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_left" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="用餐类型" DataField="TimeName" Visible="False">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_left" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="荤素类别" DataField="ClassName">
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="套菜类别" DataField="KindName">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="菜式类别" DataField="TypeName">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="送菜类别" DataField="DeliveryName">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="菜名" DataField="DishName">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="15%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="单价" DataField="DishPrice" DataFormatString="{0:N}" HtmlEncode="False">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="15%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="选择">
                                <EditItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </EditItemTemplate>
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle CssClass="GridView_head_grayblue" Width="5%" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                        <PagerStyle HorizontalAlign="Right" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
            <td>
            <a href="#" onclick="selectAll()">全选/</a><a href="#" onclick="cancelAll()">取消</a>
            </td>
        </tr>
            <tr>
            <td align="center">
                <asp:Button ID="btnOk" runat="server" Text="确定" CssClass="button" Width="83px" OnClick="btnOk_Click"/>
                <asp:Button ID="Button2" runat="server" Text="取消" CssClass="button" Width="83px" Visible="False" /></td>
        </tr>
        </table>
    </div>
    <asp:HiddenField ID="hidDishs" runat="server" />
</asp:Content>
